package cn.jilian.front.config;

import com.baidu.aip.ocr.AipOcr;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BaiduOcrConfig {

    @Value("${baiduyun.ocr.apiid}")
    private String apiId;
    @Value("${baiduyun.ocr.apikey}")
    private String apiKey;
    @Value("${baiduyun.ocr.secretkey}")
    private String secretKey;

    @Bean
    public AipOcr getAipOcr() {
        return new AipOcr(apiId, apiKey, secretKey);
    }
}
